package com.plian.system.wrapper.pf;

import com.plian.system.dto.pf.PerformanceScoreMethodDTO;
import com.plian.system.entity.pf.PerformanceScoreMethod;
import com.plian.system.mybatis.support.BaseWrapper;
import com.plian.system.vo.pf.PerformanceScoreMethodVO;
import com.plian.system.wrapper.util.CacheWrapperUtil;
import com.plian.system.wrapper.util.WrapperUtil;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import static com.plian.system.wrapper.util.WrapperConstant.OFFICE_ID_TO_NAME;
import static com.plian.system.wrapper.util.WrapperConstant.SPRING;

@Mapper(componentModel = SPRING, uses = {CacheWrapperUtil.class, WrapperUtil.class})
public interface PerformanceScoreMethodWrapper extends BaseWrapper<PerformanceScoreMethod, PerformanceScoreMethodDTO, PerformanceScoreMethodVO> {


    @Override
    @Mappings(value = {
            @Mapping(source = "reportOffice", target = "reportOfficeName", qualifiedByName = OFFICE_ID_TO_NAME),
    })
    PerformanceScoreMethodVO entityToVO(PerformanceScoreMethod entity);
}
